1. Field of the Invention
This invention concerns relational databases, and, more specifically a partitioned relational database system comprising multiple database management systems each of which exclusively stores a partitioned copy of the data. The invention provides support in such a system for processing complex data types, such as images.
Database management systems (DBMSs) are widely used information resources for enterprises. One highly successful DBMS model is the relational database that is organized and accessed according to relationships between units of data in the database. The relations are typically manifested or embodied in the form of tables. Each table expresses some association between units of database content.
To expand data processing capabilities with respect to large databases, a number of database system models have been developed to integrate separate DBMSs with logic and support that enable them to operate as a single system. One of these models, the xe2x80x9cshared nothing data systemxe2x80x9d typically includes multiple nodes, each comprising a processor and storage that is exclusive to the processor. The processors are linked by a network and their operations are synchronized and integrated by a message-passing facility that provides connectivity between each node and every other node of the partitioned system. There is a one-to-one relationship between each node and the portion of database contents stored thereat. In other words, each node owns and stores a specific segment of the database contents and has sole responsibility for physical access to that segment. One of the multiple nodes is designated as the coordinating node. A request for access to the database is received through the coordinating node and communicated therefrom to the correct node that owns the requested data.
While database system architectures continue to evolve, it is also the case that many new forms of data having multiple attributes, complex internal structures, and specialized behaviors are being stored in databases. These are referred to as xe2x80x9ccomplex data typesxe2x80x9d.
One example of specialized database processes that have been developed and implemented to support storage of and access to complex data in the form of images in a relational database system is given in U.S. Pat. Nos. 5,579,471 and 5,751,286, both commonly assigned with this application, and both incorporated herein by reference. These patents describe an image database system that supports queries by image content (xe2x80x9cQBICxe2x80x9d). The first-incorporated patent application cross-referenced above sets forth a detailed description of relational extenders (including an image extender) that extend a relational database table with complex data types in such a way as to present them as a seamless extension of an existing relational database system. These relational extenders have been incorporated into the DB2(trademark) database system available from the International Business Machines Corporation, Armonk, N.Y. In the current version of the DB2(trademark) database system, an image relational extender enables QBIC operations to be performed with and on images stored in the system.
To date, database relational extenders have not been available for use in a partitioned relational database of the shared-nothing kind. Manifestly, the growing importance of data management in large enterprises, the operational efficiency that the partitioned model brings to such systems, and the increasing demand for use of complex data in such systems necessitates the investment of partitioned database systems of the shared-nothing type with the ability to support processing of such data types. This calls for appropriate adaptation of relational extenders for complex data types.
In particular, the progress in development of QBIC technology provides an opportunity to adapt the image database extender for use in a partitioned, shared-nothing database system.
Broadly, this invention concerns the modification of one or more database relational extenders so as to enable a partitioned database system of the shared-nothing model to store complex data types in the database system, and to process queries directed to the image data type. The relational extenders in the incorporated patent application include data structures and processes for receipt and processing of complex data types in a relational database system. The extender model treats a complex data type as an object possessing attributes. A complex data object has a unique object handle (identification label) that is stored in a column of a relational table to represent the object. The object handle points to one or more metadata tables. A metadata table either contains the object data or points to its location in the database system.
In a partitioned database system, the relations (that is, the tables) are partitioned horizontally according to partition keys. A partition key is defined over one or more columns of a table, and is used to divide the table into partitions. Each partition corresponds to a separate unit of storage and contains a portion of the data in the table. Each partition of the table is assigned to a node of the plurality of nodes that make up the partitioned, shared-nothing system. When assigned, the partition is sent to the node for storage at the node.
Triggers provided by the DB2(trademark) database system allow automatic dispatch of specific procedures whenever a table in the relational database system is the subject of an update, deletion, or insertion, that is whenever a table is changed. For example, when image object data is inserted, deleted, or updated, the system invocation of the appropriate trigger results in creation of or changes to an xe2x80x9cindexxe2x80x9d that represents the image by attributes that images generally have. Such attributes include average color, texture, color histogram, color location and so on.
Finally, the relational extenders support user defined functions (UDFs) that allow functions to be defined, written in a computer language, or derived from built-in functions. UDFs supported by the image relational extender permit users to define operations that are to be performed on images stored in a database.
This invention supports the application of relational extenders for complex data types in a partitioned database system of the shared-nothing model by collocating metadata table entries with corresponding relational table partitions at the proper nodes. The invention also provides for the indexing of image data at the node where an image object is to be stored. Finally, the invention provides for the support of image query UDFs at the nodes where the objects of the queries are stored.
Additional features of this invention will become evident from the following detailed description of the preferred embodiments for carrying out the invention and from the appended claims.